package codename.primavera.service;

import java.util.List;

import org.springframework.security.access.annotation.Secured;
import org.springframework.security.core.userdetails.UserDetailsService;

import codename.primavera.model.User;

/**
 * The Interface UserService.
 * @author AIEXM45
 */
public interface UserService extends UserDetailsService {

    /**
     * Search.
     * @return the list
     */
    List < User > search();

    /**
     * Search by criteria.
     * @return the list
     */
    List < User > searchByCriteria();
    
    
    /**
     * Deletes a user.
     * @param someUser some user
     */
    void delete(User someUser);
    
    /**
     * Creates a user.
     * @param someUser some user
     */
    void create(User someUser);

    
    /**
     * Returns the supersecretconfidential password.
     * Security should only allow  users with ROLE_ADMIN to reach this.
     * @return a random string, not <code>null</code>
     */
    @Secured ({"ROLE_ADMIN"})
    String getSuperSecretConfidentialPassword();
    
}
